Repository navigation
Fix #1946: check-timeout tests tell a late Windows kill from no kill - #1947
Merged
Merged
Conversation
The three bugfix-1814 timeout tests slept 3s under a 300ms timeout and bounded the check at 2500ms. On Windows the teardown (census, job termination, taskkill) takes ~3s under full-suite load, so the sleep could finish on its own and still report "Timed out". Sleep 30s instead, bound the check at 15s on win32 (2500ms on POSIX), assert the bound in all three tests, and give them a 45s test timeout so a check nobody killed fails on the bound. Test-only: porch's timeout behaviour is unchanged. With the kill disabled, all three fail at ~30s against the 15s bound.
amrmelsayed
added a commit
that referenced
this pull request
Nov 22, 2026
amrmelsayed
added a commit
that referenced
this pull request
Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The three
bugfix-1814-check-timeouttimeout tests failed on native Windows under full-suite load: a 3s sleep under a 300ms timeout was bounded at 2500ms, and a slow Windows teardown made a late kill indistinguishable from no kill. Test-only fix; porch's timeout behaviour is unchanged.Fixes #1946
Root Cause
On Windows a timed-out check is torn down by a fresh census, a job termination and a
taskkill, each its own process launch. Under load that takes ~3s. Reproduced with synthetic load (busy CPU workers plus constant process launches), 300ms timeout:sleep 3sleep 30So the kill lands late, it does not fail to land, and there's no product bug. With a 3s sleep the command could finish on its own inside that window and still report "Timed out", because
killedis set when the timer fires, so the 2500ms bound was not measuring the kill.Fix
In
packages/codev/src/commands/porch/__tests__/bugfix-1814-check-timeout.test.ts:sleep 3now usesleep 30(SLOW_COMMAND).KILLED_WITHIN_MS). All three tests now assert it, along with the "Timed out after 0.3s" error.Test Plan
killGroupcalls removed fromchecks.ts(temporary, reverted), all three tests fail at ~30.1s against the 15s bound. With the kill in place, they pass.porch done(build + tests passed first try), runs 2–3npm test: 406 files passed / 9 skipped, 8110 tests passed / 247 skipped each.No Windows workflow dispatch: no platform code is touched.